package org.example.lotterysystem.controller.result;

import org.example.lotterysystem.service.dto.ActivityDetailDTO;
import org.example.lotterysystem.service.enums.ActivityPrizeStatusEnum;
import org.example.lotterysystem.service.enums.ActivityPrizeTiersEnum;
import org.example.lotterysystem.service.enums.ActivityStatusEnum;
import org.example.lotterysystem.service.enums.ActivityUserStatusEnum;

import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;

public class GetActivityDetailResult {
    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 活动名称
     */
    private String activityName;
    /**
     * 活动描述
     */
    private String description;

    /**
     * 活动是否有效
     */
    private Boolean valid;


    /**
     * 奖品信息（列表）
     */
    private List<Prize> prizes;
    /**
     * 人员信息（列表）
     */
    private List<User> users;

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getValid() {
        return valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    public List<Prize> getPrizes() {
        return prizes;
    }

    public void setPrizes(List<Prize> prizes) {
        this.prizes = prizes;
    }

    public List<User> getUsers() {
        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }

    public static class Prize {
        /**
         * 奖品id
         */
        private Long prizeId;

        /**
         * 奖品名
         */
        private String name;

        /**
         * 图片索引
         */
        private String imageUrl;

        /**
         * 价格
         */
        private BigDecimal price;

        /**
         * 描述
         */
        private String description;
        /**
         * 奖品等级
         */
        private String  prizeTierName;

        /**
         * 奖品数量
         */
        private Long prizeAmount;

        /**
         * 奖品是否有效
         */
        private Boolean valid;

        public Long getPrizeId() {
            return prizeId;
        }

        public void setPrizeId(Long prizeId) {
            this.prizeId = prizeId;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getImageUrl() {
            return imageUrl;
        }

        public void setImageUrl(String imageUrl) {
            this.imageUrl = imageUrl;
        }

        public BigDecimal getPrice() {
            return price;
        }

        public void setPrice(BigDecimal price) {
            this.price = price;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public String getPrizeTierName() {
            return prizeTierName;
        }

        public void setPrizeTierName(String prizeTierName) {
            this.prizeTierName = prizeTierName;
        }

        public Long getPrizeAmount() {
            return prizeAmount;
        }

        public void setPrizeAmount(Long prizeAmount) {
            this.prizeAmount = prizeAmount;
        }

        public Boolean getValid() {
            return valid;
        }

        public void setValid(Boolean valid) {
            this.valid = valid;
        }

        @Override
        public boolean equals(Object object) {
            if (this == object) return true;
            if (object == null || getClass() != object.getClass()) return false;
            Prize prize = (Prize) object;
            return Objects.equals(prizeId, prize.prizeId) && Objects.equals(name, prize.name) && Objects.equals(imageUrl, prize.imageUrl) && Objects.equals(price, prize.price) && Objects.equals(description, prize.description) && Objects.equals(prizeTierName, prize.prizeTierName) && Objects.equals(prizeAmount, prize.prizeAmount) && Objects.equals(valid, prize.valid);
        }

        @Override
        public int hashCode() {
            return Objects.hash(prizeId, name, imageUrl, price, description, prizeTierName, prizeAmount, valid);
        }
    }
    public static class User {
        /**
         * 用户id
         */
        private Long userId;
        /**
         * 姓名
         */
        private String userName;

        /**
         * 人员是否被抽取
         */
        private Boolean valid;

        @Override
        public boolean equals(Object object) {
            if (this == object) return true;
            if (object == null || getClass() != object.getClass()) return false;
            User user = (User) object;
            return Objects.equals(userId, user.userId) && Objects.equals(userName, user.userName) && Objects.equals(valid, user.valid);
        }

        @Override
        public int hashCode() {
            return Objects.hash(userId, userName, valid);
        }

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        public Boolean getValid() {
            return valid;
        }

        public void setValid(Boolean valid) {
            this.valid = valid;
        }
    }
}
